<!DOCTYPE html>
<body>
  <div style="-webkit-filter: url('#filter'); filter: url('#filter'); width: 100px; height: 100px; padding: 1px;">
    <div style="background-color: red; width: 98px; height: 98px;"></div>
  </div>
  <svg width="0" height="0">
    <filter id="filter">
      <feFlood result="outlineColor" flood-color="green"/>
      <feMorphology in="SourceAlpha" operator="dilate" radius="1"/>
      <feComposite operator="in" in="outlineColor"/>
    </filter>
  </svg>
</body>
